<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping package="com.jd.ty.pojo">
	<class name="Employee" table="EMPLOYEE" schema="TYMS">
		<id name="employeeId" type="java.lang.Long">
			<column name="EMPLOYEE_ID" precision="10" scale="0" />
			<generator class="identity"></generator>
		</id>
		<property name="employeeName" type="java.lang.String">
			<column name="EMPLYEE_NAME" length="20" not-null="true"
				unique="true" />
		</property>
		<many-to-one name="department" class="Dictionary" fetch="select"
			lazy="false">
			<column name="DEPARTMENT_ID" precision="10" scale="0" />
		</many-to-one>

		<many-to-one name="degree" class="Dictionary" fetch="select"
			lazy="false">
			<column name="DEGREE_ID" precision="10" scale="0" />
		</many-to-one>

		<property name="registerTime" type="timestamp">
			<column name="REGISTER_TIME" />
		</property>
		<property name="phoneNumber" type="java.lang.String">
			<column name="PHONE_NUMBER" length="50" />
		</property>
		<property name="socialId" type="java.lang.String">
			<column name="SOCIAL_ID" length="20" />
		</property>
		<property name="address" type="java.lang.String">
			<column name="ADDRESS" length="200" />
		</property>
		<property name="endTimeOfIntern" type="timestamp">
			<column name="END_TIME_OF_INTERN" />
		</property>

		<property name="timeOfEmployment" type="timestamp">
			<column name="TIME_OF_EMLOYMENT" />
		</property>

		<many-to-one name="socialStatus" class="Dictionary"
			fetch="select" lazy="false">
			<column name="SOCIAL_STATUS_ID" precision="10" scale="0" />
		</many-to-one>
		<property name="timeOfLeaving" type="timestamp">
			<column name="TIME_OF_LEAVING" length="20" />
		</property>
		<property name="remarks" type="java.lang.String">
			<column name="REMARKS" length="200" />
		</property>
		<many-to-one name="position" class="Position" fetch="select"
			lazy="false">
			<column name="POSITION_ID" precision="10" scale="0" />
		</many-to-one>
		<many-to-one name="userInfo" class="com.jd.ty.pojo.User"
			fetch="select" cascade="all" lazy="false">
			<column name="USER_INFO_ID" precision="10" scale="0" />
		</many-to-one>
		<property name="contactInBJ" type="java.lang.String">
			<column name="CONTECT_IN_BJ" length="20" />
		</property>
		<property name="phoneOfContactInBJ" type="java.lang.String">
			<column name="PHONE_OF_CONTACT_IN_BJ" length="50" />
		</property>
		<property name="addressInBJ" type="java.lang.String">
			<column name="ADDRESS_IN_BJ" length="200" />
		</property>


	</class>
</hibernate-mapping>
